{% extends "/fragments/base.html" %}
{% block title %}测试到预发环境部署{% endblock %}

{% block content %}
<script src="{{ url_for('static', filename='js/pre_batch_deploy.js') }}"></script>

<h1>测试到预发环境部署状态查询</h1>
<div class="content_container">
    <div>
        <h3>任务号:{{task_number}} </h3>
        <table class="table table-striped table-bordered">
            <thead>
            <th class="w-25">job name</th>
            <th>build number</th>
            <th>queue item</th>
            <th>status</th>
            <th class="w-25">progress</th>
            </thead>
            <tbody id="tbody">
            {% for job_name,build_number,queue_item in job_list %}
            <tr class="item">
                <td class="job_name w-25">{{job_name}}</td>
                <td class="build_number">{{build_number}}</td>
                <td class="queue_item">{{queue_item}}</td>
                <td id="status_{{job_name}}" class="status"></td>
                <td class="progress_bar w-25">
                    <div class="progress">
                        <div id="progress_bar_{{job_name}}"
                             class="progress-bar progress-bar-striped progress-bar-animated"
                             role="progressbar"
                             aria-valuenow="0"
                             aria-valuemin="0" aria-valuemax="100" style="width: 0%"></div>
                    </div>
                </td>
            </tr>
            {% endfor %}
            </tbody>
        </table>
    </div>
    <div id="query_result_show">

    </div>
</div>


<span>job_name:</span>
<input id="job_name" name="job_name" type="text">
<input id="build_number" name="build_number" type="text">
<input id="queue_item" name="queue_item" type="number">
<input id="request_date" name="request_date" type="datetime-local">
<button type="hidden" id="btnSubmit" class="btn btn-primary">query</button>
<button type="submit" id="batchSubmit" class="btn btn-primary">batchSubmit</button>
<span id="checkResult"></span>
<div class="progress">
    <div id="progress_bar" class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar"
         aria-valuenow="0"
         aria-valuemin="0" aria-valuemax="100" style="width: 0%"></div>
</div>

{% endblock %}